
// flexslider
$(document).ready(function() {
	$('.bodyslider').flexslider({
		directionNav: true,
		pauseOnAction: false,
	});
	$('.function-slider1').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider2').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider3').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider4').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider5').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider6').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider7').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider8').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider9').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
	$('.function-slider10').flexslider({
		directionNav: true,
		pauseOnAction: false,
		slideshowSpeed: 2000,
	});
});



// accordion
 var $list = $("#accordion li"),
            isSameLi = function(e, t) {
                return e.attr("id").indexOf(t.attr("id")) == -1 ? !1 : !0
            },
            expandsCommon = function(e) {
                lastLeaveLi && (isSameLi(e, lastLeaveLi) || hideCommon(lastLeaveLi)), $this = e, $this.stop().animate({
                    width: "534px"
                }, 500, function() {
                    $(".imgfr", e).stop(!0, !0).show(), $(".btn-sy", e).stop(!0, !0).fadeIn()
                }).removeClass("bor-g").addClass("bor-red"), $("#accordion > li").each(function() {
                    var t = $(this);
                    isSameLi(e, t) || hideCommon(t)
                })
            },
            hideCommon = function(e) {
                $this = e, $this.stop().animate({
                    width: "247px"
                }, 1e3).removeClass("bor-red").addClass("bor-g"), $(".imgfr", e).stop(!0, !0).hide(), $(".btn-sy", e).stop(!0, !0).fadeOut()
            },
            lastLeaveLi = undefined;
    $(function() {
        expandsCommon($("#accordion > li:first")), $("#accordion > li").hover(function() {
            var e = $(this);
            expandsCommon(e)
        }, function() {
            lastLeaveLi = $(this)
        })
    });

// quantity
$(document).ready(function() {
  $(".quantity-bg").hover(function(e) {
    $(this).find('.quantity-hover').fadeIn();
},function(){
	$(this).find('.quantity-hover').fadeOut();
	});
});

// fadetab
$("#fadetab").tabso({
		cntSelect:"#fadecon",
		tabEvent:"click",
		tabStyle:"normal"
});


//scroll
	var animateEnd = 1;
	$(".scroll-right").on('click',function() {
		nextscroll()
	});
	function nextscroll() {
		var vcon = $(".ul-wrap");
		var offset =-124;
		vcon.stop().animate({
			left: offset
		}, "slow", function() {
			var firstItem = $(".ul-wrap ul li").first();
			vcon.find("ul").append(firstItem);
			$(this).css("left", "0px");
		})
	};
	$(".scroll-left").on('click',function() {
		var vcon = $(".ul-wrap");
		var offset =-124;
		var lastItem = $(".ul-wrap ul li").last();
		vcon.find("ul").prepend(lastItem);
		vcon.css("left", offset);
		vcon.animate({
			left: "0px"
		}, "slow")
	});

//banner
$(document).ready(function(){
	if($("#indexBannerImages").length > 0){
		$("#indexBanner").hImagesSlide({
				container:$("#indexBannerImages"),
				 nav:$("#indexBannerNav")
	});
};
});







